return {
  "olimorris/codecompanion.nvim",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-treesitter/nvim-treesitter",
  },
  opts = {
    debug = true,
    log_level = "DEBUG",
    strategies = {
      chat = {
        adapter = "deepseek",
        model = "deepseek-r1:latest", -- 直接在策略中指定模型
      },
      inline = {
        adapter = "deepseek",
        model = "deepseek-r1:latest",
      },
    },
    adapters = {
      ollama = function()
        return require("codecompanion.adapters").extend("ollama", {
          env = {
            url = "http://localhost:11434",
          },
          schema = {
            model = {
              default = "deepseek-r1:latest",
            },
            temperature = {
              default = 0.3,
            },
            -- 添加超时设置
            request_timeout = 30000, -- 30秒
          },
        })
      end,
      deepseek = function()
        return require("codecompanion.adapters").extend("openai", {
          env = {
            url = "https://api.deepseek.com/chat/completions",
            api_key = os.getenv("DEEPSEEK_API_KEY"),
          },
          schema = {
            model = {
              default = "deepseek-r1:latest",
            },
            temperature = {
              default = 0.7,
            },
          },
        })
      end,
    },
  },
  config = function(_, opts)
    require("codecompanion").setup(opts)
  end,
}
